<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var mydate = new Date();
    var date1=new Array(4);
    date1[0]=mydate.getTime();
    date1[1]=mydate.getFullYear();
    date1[2]=mydate.getMonth();
    date1[3]=mydate.getDate();//从0开始算几号
    date1[4]=mydate.getDay();//从1开始算周几
    console.log(mydate);
    console.log(date1);
</script>
</body>
</html>